#include <vector>
#include <thread>
#include <chrono>

#include "./BenchmarkWorkloadBase.h"
#include "./TestSetBase.h"

using namespace std;


#include "./common_config.h"
namespace {
const struct {
    vector<unsigned> thread_nrs = {1, 4, 8, 16, 32, 64};
    unsigned minimum_times_to_run = 1e4;
} test_config;
}


struct TestNop : BenchmarkWorkloadBase {
    explicit TestNop(unsigned thread_nr)
        : BenchmarkWorkloadBase("nop", thread_nr, test_config.minimum_times_to_run)
    { }

    void init(TestSetBase *testctx) const override
    { }

    void workload(TestSetBase *testctx, unsigned thread_id, uint64_t seed) const override
    {
        using namespace std::chrono_literals;
        // std::this_thread::sleep_for(50us);
    }

    void cleanup(TestSetBase *testctx) const override
    { }
};  /* class TestNop */


struct __nop_testset : TestSetBase {
    __nop_testset() : TestSetBase("nop")
    {
        for (const auto t : test_config.thread_nrs)
            test_cases.push_back(make_unique<TestNop>(t));
    }
};  /* struct __nop_testset */

__nop_testset exported_testset{};
